<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/lib/editor/stylesheets/xq_ui.css" />
<script type="text/javascript" src="/lib/editor/javascripts/XQuared.js?load_others=1"></script>
<script type="text/javascript" src="/lib/editor/javascripts/plugin/FileUploadPlugin.js"></script>
<script type="text/javascript">//<![CDATA[
var xed;

window.onload = function() {
	xed = new xq.Editor("xqEditor");

	xed.isSingleFileUpload = true;
	xed.addPlugin('FileUpload');
	xed.setFileUploadTarget('/common/imageupload.do', null);
	xed.setEditMode('wysiwyg');
	xed.setWidth("100%");
};
//]]>
</script>
<script type="text/javascript" src="/js/validator.js"></script>
<script type="text/javascript">
function sendit()
{
	var frm = document.forms["frm"];
	var contents = xed.getCurrentContent(true);
	if (contents == "<p>&nbsp;</p>")
	{
		alert("내용을 입력하세요.");
		return false;
	}

	alert( contents );
	return true;
}
</script>
<title>Editor Demo</title>
</head>
<body>
	<br /><br /><br /><br />
	<br /><br /><br /><br />
	<span class="button btnProc01"><a href="/common/download.do?fileid=1&jobid=20140402112332491100">다운로드</a></span>
	<form name="frm" onsubmit="return sendit()">
		<div class="ar">
			<span class="button btnProc01"><input type="submit" value="저장" /></span>
		</div>
		<textarea id="xqEditor" name="article_contents"></textarea>
	</form>
</body>
</html>